package com.abc.core.tool;

import com.abc.core.def.DnaDbMap;
import com.abc.core.def.DnaDbMapBuilder;

public class PartyDnaTool {
    public static DnaDbMap getPartyDbMap() {
        DnaDbMapBuilder builder = DnaDbMap.createBuilder(
                "party_dna",
                "T_Party",
                "T_Party_Ext",
                new String[]{"partyCode",
                        "partName",
                        "birthday",
                        "gender",
                        "certType",
                        "certId",
                        "contact",
                        "contactMobileNo",
                        "address"
                },
                null, new String[]{"contact", "contactMobileNo"}, false);

        builder.setDnaMapType(DnaMapType.ROOT_SIMPLE);
        builder.setRequireRootId(false);

        return builder.getDnaDbMap();
    }

    public static DnaDbMap getPartyAccountDbMap() {
        DnaDbMapBuilder builder = DnaDbMap.createBuilder(
                "party_account_dna",
                "T_Party_Acount",
                null,
                new String[]{"bankName",
                        "accounNo",
                        "accountName",
                        "address",
                        "certType",
                        "postCode"
                },
                null, null, false);

        builder.setDnaMapType(DnaMapType.SIMPLE);
        builder.setRequireRootId(false);

        return builder.getDnaDbMap();

    }
}
